-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-18448][CORE] SparkSession should implement java.lang.AutoCloseable like JavaSparkContext #15932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Test build #68854 has finished for PR 15932 at commit
|
|
Yep that's precisely what I was envisioning. Thanks @srowen ! |
|
Nice - given it's a tiny change I'd put this in 2.1, unless somebody else objects. @srowen ? |
|
Sure I'll put it in first thing tomorrow if there are no objections. |
|
Great! |
|
Merged to master/2.1 |
…able like JavaSparkContext ## What changes were proposed in this pull request? Just adds `close()` + `Closeable` as a synonym for `stop()`. This makes it usable in Java in try-with-resources, as suggested by ash211 (`Closeable` extends `AutoCloseable` BTW) ## How was this patch tested? Existing tests Author: Sean Owen <[email protected]> Closes #15932 from srowen/SPARK-18448. (cherry picked from commit db9fb9b) Signed-off-by: Sean Owen <[email protected]>
## What changes were proposed in this pull request? Fix since 2.1.0 on new SparkSession.close() method. I goofed in #15932 because it was back-ported to 2.1 instead of just master as originally planned. Author: Sean Owen <[email protected]> Closes #15938 from srowen/SPARK-18448.2.
## What changes were proposed in this pull request? Fix since 2.1.0 on new SparkSession.close() method. I goofed in #15932 because it was back-ported to 2.1 instead of just master as originally planned. Author: Sean Owen <[email protected]> Closes #15938 from srowen/SPARK-18448.2. (cherry picked from commit ded5fef) Signed-off-by: Sean Owen <[email protected]>
|
|
||
| /** | ||
| * Synonym for `stop()`. | ||
| * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need to update this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah fixed it in a follow up.
…able like JavaSparkContext ## What changes were proposed in this pull request? Just adds `close()` + `Closeable` as a synonym for `stop()`. This makes it usable in Java in try-with-resources, as suggested by ash211 (`Closeable` extends `AutoCloseable` BTW) ## How was this patch tested? Existing tests Author: Sean Owen <[email protected]> Closes apache#15932 from srowen/SPARK-18448.
## What changes were proposed in this pull request? Fix since 2.1.0 on new SparkSession.close() method. I goofed in apache#15932 because it was back-ported to 2.1 instead of just master as originally planned. Author: Sean Owen <[email protected]> Closes apache#15938 from srowen/SPARK-18448.2.
What changes were proposed in this pull request?
Just adds
close()+Closeableas a synonym forstop(). This makes it usable in Java in try-with-resources, as suggested by @ash211 (CloseableextendsAutoCloseableBTW)How was this patch tested?
Existing tests